import { ResPage, Station, ResultData } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 工位管理模块
 */
// 获取工位列表
export const getStationList = (params: Station.ReqStationInfoParams) => {
  return http.post<ResPage<Station.ResStationInfoList>>(`/wrongwiring/files/station/query`, params);
};
// 获取工位详情
export const getStationDtl = (params: { deviceId: string }) => {
  return http.post<ResultData>(`/wrongwiring/files/station/detail`, params);
};
// 新增工位
export const addStation = (params = {}) => {
  return http.post(`/wrongwiring/files/station/add`, params);
};
// 编辑工位
export const editStation = (params: { deviceId: string }) => {
  return http.post(`/wrongwiring/files/station/modify`, params);
};

// 删除工位
export const deleteStation = (params: { deviceList: { deviceId: string }[] }) => {
  return http.post(`/wrongwiring/files/station/remove`, params);
};

// 获取工位选择列表
export const getStationSelList = (params = {}) => {
  return http.post(`/wrongwiring/files/station/selectionList`, params);
};
